/**
 * 使用方法
 * <footer current="2"></footer>
 * */
const app = getApp();
Component({

    properties: {
        /**
         * 是否显示
         * */
        current: {type: String, value: ''},
        showLeft: {type: Boolean},
        showNav: {type: Boolean},
        list: {type: Array}
    },
   data: {},

    methods: {
        toPage: function (even) {
            
            let $dataset = even.currentTarget.dataset;
            if ($dataset.item.id == this.data.current) return;
            this.triggerEvent('changeTypeId', {id: $dataset.item.id})
            
        },
        showLefts: function () {
            this.setData({
                showLeft: true
            })
            this.triggerEvent('myevent', this.data.showLeft)
        },
        showNas: function () {
            this.setData({
                showNav: this.data.showNav = !this.data.showNav
            })
            this.triggerEvent('navEvent', this.data.showNav)
        }
    },
});
